package org.andes.kownledge;

import java.io.InputStream;
import java.util.List;

import org.andes.help.struct.PsmGraph;
import org.andes.help.struct.SystemEntry;

/**
 * Created by IntelliJ IDEA.
 * User: wenfeix
 * Date: 2011-2-1
 * Time: 9:43:46
 * To change this template use File | Settings | File Templates.
 */
public class Qnode extends BubbleNode {
    /**(defstruct (Qnode (:print-Function Print-Qnode))
  (Symbol (gensym "Qnode"))		; Unique Gensym symbol for identification.
  Gindex				; Integer index of the symbol in graph list (may supersede symbol.)
  VIndex				; Index of the variable in the varlist corresponding to this qnode.
  Exp					; Lisp Expression representing this quantity.
  var					; The Expression symbol used in the solver equations.
  Eqns					; Equation nodes containing this quantity.
  Marks					; Markings added to the node for help system purposes.
  path					; Optional path that may be used for data storage.
  Assumptions				; Assumptions made in the path.
  Entries                               ; List of entry props that are in this node's psm.
  )   */

	private String Symbol;
    private int vindex;
    //Lisp Expression representing this quantity.
    private String   Exp;
    //; The Expression symbol used in the solver equations.
    private String Var;

    private String Eqns;

    private List<Enode> eqns;
    private String marks;
    private String assumptions;
     private String Entriess;
    private List<SystemEntry> entries;
    public List<SystemEntry> entries(){
        return entries;
    }
     private PsmGraph path;
     public PsmGraph getPath() {
        return path;
    }

    public void readContent(InputStream S) throws Exception {
    	Symbol=mg_sr(S);
         gindex=Integer.valueOf(mg_sr(S));
         vindex=Integer.valueOf(mg_sr(S));
        Exp= mg_sr(S);
        Var= mg_sr(S);
        Eqns= mg_sr(S);
        marks= mg_sr(S);
        mg_sr(S);//path
        assumptions= mg_sr(S);
        Entriess= mg_sr(S);
       

    }
}
